# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: jhkim, jaewon

import datetime
from coin.exchange.okex_futures.order_gateway import OkexFuturesOrderGateway
from coin.exchange.okex_futures_v3.order_gateway import OkexFuturesOrderGateway as OkexFuturesOrderGatewayV3
from coin.strategy.mm.subscription import SubscriptionRequest
from coin.strategy.mm.base.order_subsystem import BaseOrderSubsystem


class OkexFuturesOrderSubsystem(BaseOrderSubsystem):
  OrderGateway = OkexFuturesOrderGateway
  OrderSubReq = SubscriptionRequest('Futures', 'Okex', 'v1')
  _delay_notify_order_gateway_reset = datetime.timedelta(seconds=5)


class OkexFuturesOrderSubsystemV3(BaseOrderSubsystem):
  OrderGateway = OkexFuturesOrderGatewayV3
  OrderSubReq = SubscriptionRequest('Futures', 'Okex', 'v3')
  _delay_notify_order_gateway_reset = datetime.timedelta(seconds=5)
  _use_og_params = True
